Problem: $f(x, y) = \left( -\sin(x)\sin(y), \cos(x)\cos(y) \right)$ Find $F$ such that $f = \nabla F$. $F(x, y) =$ $ + \, C$
Explanation: We know that $\nabla F = f$. Therefore: $\begin{aligned} F_x &= -\sin(x)\sin(y) \\ \\ F_y &= \cos(x)\cos(y) \end{aligned}$ Let's integrate these two equations. Instead of getting a constant at the end of each integral, we'll get a function of the variable with respect to which we didn't integrate. [Example] $\begin{aligned} F &= \int F_x \, dx \\ \\ &= \int -\sin(x)\sin(y) \, dx \\ \\ &= \cos(x)\sin(y) + H(y) \\ \\ F &= \int F_y \, dy \\ \\ &= \int \cos(x)\cos(y) \, dy \\ \\ &= \cos(x)\sin(y) + G(x) \end{aligned}$ Now we can set both ways of writing $F$ equal to find $G$ and $H$. $\cos(x)\sin(y) + H(y) = \cos(x)\sin(y) + G(x)$ Therefore: $\begin{aligned} G(x) &= C_1 \\ \\ H(y) &= C_2 \end{aligned}$ We can write $C_1$ and $C_2$ as a single arbitrary constant $C$ in the final version of $F$. Putting everything together: $F(x, y) = \cos(x)\sin(y) + C$